package com.ruoyi.project.common;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.cms.domain.vo.CmsAreaCascaderVo;
import com.ruoyi.project.cms.service.ICmsAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 通用行政区划Controller
 * 
 * @author ruoyi
 * @date 2020-10-13
 */
@RestController
@RequestMapping("/common/area")
public class CommonAreaController extends BaseController
{
    @Autowired
    private ICmsAreaService cmsAreaService;


    /**
     * 行政区划级联
     */
    @GetMapping("/cascader")
    public AjaxResult<List<CmsAreaCascaderVo>> cascader()
    {
        List<CmsAreaCascaderVo> list = cmsAreaService.cmsAreaCascader();
        return AjaxResult.success(list);
    }

}
